//
//  CoreDataManager.h
//  iCarStyle
//
//  Created by liu nian on 14-4-16.
//  Copyright (c) 2014年 liunian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NewsImg.h"
#import "NewsText.h"

@class NewsArticle;
@class Article;
@class SinglePic;
@class PicModel;

@interface CoreDataManager : NSObject
+ (CoreDataManager *)sharedManager;
- (void)insertArticle:(Article *)article;

- (void)insertSinglePic:(SinglePic *)singlePic;

- (void)insertPicture:(PicModel *)picture;

- (NSArray *)singlePicsForPicture:(PicModel *)picture;

- (void)getArticles;
- (BOOL)isFavArticle:(Article *)article;
- (void)favArticle:(Article *)article;
- (void)cancelFavArticle:(Article *)article;

- (void)insertNewsText:(NewsText *)newsText;
- (void)insertNewsImg:(NewsImg *)newsImg;
- (NewsArticle *)newsArticleWithArticle:(Article *)article;
@end
